package com.dkha.server.mappers;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.dkha.common.modules.vo.camera.CameraInfoVO;
import com.dkha.server.modules.entities.FaceCameraEntity;
import com.dkha.server.modules.entities.faceCamera.FaceCameraInfo;
import com.dkha.server.modules.entities.faceCamera.FaceCameraList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 摄像头表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2019-12-08
 */
@Mapper
public interface FaceCameraDao extends BaseMapper<FaceCameraEntity> {


    List<FaceCameraList> getList(@Param("page") Page page,
                                 @Param("searchParam") Map searchParam,
                                 @Param("cameraRegion") List<Long> cameraRegion);

    List<Map<String, Object>> findByRegion(@Param("regionId") String regionId);

    List<Map<String, Object>> getAllCameraByRegionId(@Param("regionIds") List<Long> regionIds);

    List<Map<String, Object>> getCameraByRegionId(@Param("regionId") long regionId);

    List<Map<String, Object>> getRegionUnControlCamera(@Param("regionId") long regionId);

    /**
     * 判断当前区域及其子区域是否存在布控摄像头
     * @param regionId
     * @return
     */
    int isCameraInRegion(@Param("regionId") String regionId);

    CameraInfoVO selectFaceCameraID(@Param("idFaceCamera") String idFaceCamera);

}